/* alloc.c for !ResCreate */


#include "main.h"
#include "alloc.h"



/*
 * Allocate n zeroed bytes of space; return error if not possible.
 */

error * check_alloc (void **p, int n)
{
    *p = calloc (1, n);
    if (*p == NULL)
        return error_lookup ("NoMem");

    return NULL;
}
